Ext.onReady(function() {
	Ext.define('my.model.Item', {
		 extend: 'Ext.data.Model',
		 fields: [
		     {name: 'name', type: 'string'},
		     {name: 'src', type: 'string'}
		     ]
	}); 

	Ext.define('my.store.Item', {
		extend: 'Ext.data.Store',
		model: 'my.model.Item'
	});

	Ext.define('my.control.Item', {
		extend : 'Ext.view.View',
		tpl: new Ext.XTemplate(
			'<div class="setting">',
				'<ul>',
					'<tpl for=".">',
						'<li>',
							'{name}',
						'</li>',
					'</tpl>',
				'</ul>',
			'</div>'
		),
		itemSelector: 'li',
		initComponent : function()
		{
			var me = this;
			me.store = Ext.create('my.store.Item');
			me.store.add({'name' : '部门管理', 'src' : '/sysMgr/dpt_mgr'});	
			me.store.add({'name' : '班组管理', 'src' : '/sysMgr/flight_mgr'});
			me.store.add({'name' : '职位管理', 'src' : '/sysMgr/position_mgr'});
			me.store.add({'name' : '学历管理', 'src' : '/sysMgr/education_mgr'});
			me.store.add({'name' : '政治面貌管理', 'src' : '/sysMgr/political_status_mgr'});
			me.store.add({'name' : '附件组管理', 'src' : '/sysMgr/attach_group_mgr'});
			me.store.add({'name' : '附件类型管理', 'src' : '/sysMgr/attach_type_mgr'});
			me.callParent();
		},
		listeners: {
	        itemclick: {
	            fn: function(self, record, item, index, e, eOpts){
	            	document.location.href = record.get('src');
	            }
	        },
	        itemmouseenter: function( self, record, item, index, e, eOpts ){
	        	
	        },
	        itemmouseleave: function( self, record, item, index, e, eOpts ){
	        	
	        }
	    }
	});

	var panel = Ext.create("Ext.panel.Panel", {
		border : false,
		bodyBorder : false,
		layout : 'fit',
		margin: '5 5',
		items : [
		         Ext.create('my.control.Item')
		         ]
	});
	Ext.create('Ext.Viewport', {
		layout : 'fit',
		style : 'background:none;background-color:white;',
		items : [ panel ]
	});
});